Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IA-3401 enketo emoji support #1611

Merged
merged 2 commits into from
Sep 10, 2024
Merged

IA-3401 enketo emoji support #1611

merged 2 commits into from
Sep 10, 2024

Conversation

mestachs
Copy link
Contributor

@mestachs mestachs commented Sep 4, 2024

Emoji can used in submissions, calculations in the xlsform, currently it's breaking either transparently removing the emoji from the answer, or visibly enketo integration (invalid char error)

Related JIRA tickets : IA-3401

Self proofreading checklist

  • Did I use eslint and black formatters
  • Is my code clear enough and well documented
  • Are my typescript files well typed
  • New translations have been added or updated if new strings have been introduced in the frontend
  • My migrations file are included
  • Are there enough tests
  • Documentation has been included (for new feature)

Doc

  • Tell us where the doc can be found (docs folder, wiki, in the code...)

Changes

fixes the way we parse xml and mutate the xml for enketo
to support emoji

How to test

  1. start iaso with enketo, seed
docker compose -f docker-compose.yml -f docker/docker-compose-enketo.yml up
docker compose run --rm iaso manage seed_test_data --mode=seed --dhis2version=2.40.4.1
  1. then create a new form (demo emoji)
  2. create a version and upload the xlsfile
  3. create a submission
  4. edit the submission
  5. verify the content

Print screen / video

image

Notes

The fix_emoji is just black magic... but works.
Thanks to the one who wrote it.

@bmonjoie
Copy link
Member

bmonjoie commented Sep 4, 2024

That looks nice but we have no idea how this will be interpreted by the mobile app when reimporting. We need to test that scenario before we merge this PR

@beygorghor beygorghor added the release Should be released in production at next deploy label Sep 5, 2024
@beygorghor beygorghor requested a review from mathvdh September 5, 2024 08:05
@mestachs
Copy link
Contributor Author

mestachs commented Sep 9, 2024

Initial tests with mobile were done (entities, deleting, re-synchronizing) and looks ok.
If you want to test it further @bmonjoie

Copy link
Collaborator

@mathvdh mathvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing shocking for me, we have to make sure it works in the mobile app

@mathvdh mathvdh merged commit c906582 into main Sep 10, 2024
3 checks passed
@mathvdh mathvdh deleted the IA-3401-enketo-emoji branch September 10, 2024 08:30
@kemar kemar removed the release Should be released in production at next deploy label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants